package cn.foo.controller;

import cn.foo.pojo.User;
import cn.foo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Frank
 * @date 07-06
 */
@RestController
public class HelloController {
    @Autowired
    private UserService userService;
    @RequestMapping("/hello")
    //@ResponseBody
    public String hello(){
        return "Hello,World!!!";
    }


    @RequestMapping("/list")
    public List<User> list(){
        return userService.list();
    }
}
